using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace AntidoteEngine
{
    public class Sprite
    {
        protected Texture2D image;
        protected Vector2 position;
        protected Rectangle? sourceRectangle;
        protected Color spriteColor;
        protected SpriteEffects spriteEffect;
        protected float rotation;
        protected Vector2 rotationOrigin;
        protected Vector2 scale;
        protected bool hidesprite;

        public Texture2D Image
        {
            get { return image; }        
            internal set { image = value; }
        }

        public Vector2 Position
        {
            get
            {
                return position;
            }
            internal set
            {
                position = value;
            }
        }

        public Vector2 Scale
        {
            get { return scale; }
            internal set { scale = value; }
        }

        public Rectangle? SourceRectangle
        {
            get { return sourceRectangle; }
            internal set { sourceRectangle = value; }
        }

        public Color SpriteColor
        {
            get { return spriteColor; }
            internal set { spriteColor = value; }
        }

        public SpriteEffects SpriteEffect
        {
            get { return spriteEffect; }
            internal set { spriteEffect = value; }
        }

        public float Rotation
        {
            get { return rotation; }
            internal set { rotation = value; }
        }

        public Vector2 RotationOrigin
        {
            get { return rotationOrigin; }
            internal set { rotationOrigin = value; }
        }

        public bool HideSprite
        {
            get { return hidesprite; }
            internal set { hidesprite = value; }
        }

        #region Constructors
        public Sprite(Texture2D texture,
                      Vector2 pos,
                      Rectangle? source,
                      Color col,
                      float rot,
                      Vector2 origin,
                      Vector2 scl,
                      SpriteEffects effect)
        {
            image = texture;
            position = pos;
            sourceRectangle = source;
            spriteColor = col;
            rotation = rot;
            rotationOrigin = origin;
            scale = scl;
            spriteEffect = effect;
            hidesprite = false;
        }

        public Sprite(Texture2D texture,
                      Vector2 pos,
                      Rectangle? source,
                      Vector2 scl)
        {
            image = texture;
            position = pos;
            sourceRectangle = source;
            spriteColor = Color.White;
            rotation = 0f;
            rotationOrigin = Vector2.Zero;
            scale = scl;
            spriteEffect = SpriteEffects.None;
            hidesprite = false;
        }
        #endregion
    }
}
